{extend name="layout/layout" /}

{block name="content"}
<div class="row js-check-wrap">
    <div class="col-lg-12">
        <div class="box box-success">
            <div class="box-header with-border">
                {include file="common:search" /}
                <!--<h3 class="box-title">{$title}</h3>-->
                <div class="box-tools pull-right">
                    <a href="{:url('admin/'.strtolower($model).'/add')}" class="btn btn-primary btn-sm"><i class="fa fa-plus"></i> 添加</a>
                </div>
            </div>
            <div class="box-body">
                <form class="js-ajax-form" method="post">
                    <div class="table-responsive">
                        <table class="table table-bordered table-hover dataTable">
                            <thead>
                                <th>
                                    <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
                                </th>
                                <th>ID</th>
                                <th>名称</th>
                                <th>链接</th>
                                <th>添加时间</th>
                                <th>排序</th>
                                <!--<th>状态</th>-->
                                <th>操作</th>
                            </thead>
                            <tbody>
                            {foreach $datas as $data}
                            <tr>
                                <td>
                                    <input type="checkbox" class="js-check" name="ids[]" value="{$data->id}" data-yid="js-check-y" data-xid="js-check-x">
                                </td>
                                <td>{$data->id}</td>
                                <td>{$data->name}</td>
                                <td>{$data->url}</td>
                                <td>{$data->createDate}</td>
                                <td>{$data->sorting}</td>
                                <td>
                                    <a href="{:url('admin/'.strtolower($model).'/edit', ['id' => $data->id])}" class="btn btn-info btn-xs">编辑</a>
                                    <a href="{:url('admin/'.strtolower($model).'/delete', ['id' => $data->id])}" class="btn btn-danger btn-xs" data-confirm="是否要删除这条记录？" data-title="请确认" data-confirmbtn="确定" data-cancelbtn="取消">删除</a>
                                </td>
                            </tr>
                            {/foreach}
                            </tbody>
                        </table>
                    </div>
                </form>
            </div>
            <div class="box-footer">
                {include file="common:paginate" /}
            </div>
        </div>
    </div>
</div>
{/block}

{block name="pagescript"}

{/block}